package com.coincalf.wallet.feign;

import com.coincalf.wallet.feign.hystrix.UserAddressServiceClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Description:
 * @Author: Chen Long
 * @Date: Created in 2018/5/22 下午12:23
 * @Modified by: Chen Long
 */
@FeignClient(value = "coincalf-wallet-service", fallback = UserAddressServiceClientFallback.class)
public interface UserAddressServiceClient {

    /**
     * 获取钱包充值地址
     *
     * @param userId     用户ID
     * @param coinId     币种ID
     * @param mainCoinId 主链币种ID
     * @return
     */
    @RequestMapping(value = "/address", method = RequestMethod.GET)
    Map<String, String> getAddress(@RequestParam("userId") Long userId,
                   @RequestParam("coinId") Long coinId,
                   @RequestParam("mainCoinId") Long mainCoinId);
}
